package com.sgb.kjwl.model.entity.transport;

import android.text.TextUtils;

import com.sgb.kjwl.utils.NumberUtil;

import java.util.List;

public class OwnerCarriageDetail {

    public static final int VALID = 1;
    public static final int INVALID = 2;

    private String carLenName;
    private String carNumber;
    private String carNo;
    private String carTypeName;
    private String carrierId;
    private String carrierNo;
    private String cityName;
    private String contrcts;
    private String contrctsNumber;
    private String destCityName;
    private String destDetailAddress;
    private String destDistrictName;
    private String destProvinceName;
    private String detailAddress;
    private String districtName;
    private String freight;
    private String heightHurdle;
    private String invoice;
    private Integer isDump;
    private int messageStatus;
    private String note;
    private String payType;
    private String provinceName;
    private String rate;
    private Long shipmentEndTime;
    private Long shipmentStartTime;
    private Long updateTime;
    private Double weight;
    private List<DiyFieldEntity> diyField;
    private userVo userVo;
    private Integer bargain;//是否可议价2.0.3新增
    private Integer freightUnit;
    private String unit;
    String userNo;
    Integer carrierType;
    private String invoiceName;
    private double kilometre;//公里数  商议时传入
    private int radius;//装货半径 0代表不限 其他数字表示
    private int discuss;//是否商议 1商议 0未勾选
    private Integer haulDistance;//运距要求
    private String shareUrl;//分享链接

    public String getShareUrl() {
        return shareUrl;
    }

    public void setShareUrl(String shareUrl) {
        this.shareUrl = shareUrl;
    }

    private List<String> function;//车辆功能
    private String img;
    private String roleName;
    private int terminal;

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public int getTerminal() {
        return terminal;
    }

    public void setTerminal(int terminal) {
        this.terminal = terminal;
    }

    public List<String> getFunction() {
        return function;
    }

    public void setFunction(List<String> function) {
        this.function = function;
    }

    public double getKilometre() {
        return kilometre;
    }

    public void setKilometre(double kilometre) {
        this.kilometre = kilometre;
    }

    public int getRadius() {
        return radius;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    public int getDiscuss() {
        return discuss;
    }

    public void setDiscuss(int discuss) {
        this.discuss = discuss;
    }

    public Integer getHaulDistance() {
        return haulDistance;
    }

    public void setHaulDistance(Integer haulDistance) {
        this.haulDistance = haulDistance;
    }

    public String getInvoiceName() {
        return invoiceName;
    }

    public void setInvoiceName(String invoiceName) {
        this.invoiceName = invoiceName;
    }

    public Integer getCarrierType() {
        return carrierType;
    }

    public void setCarrierType(Integer carrierType) {
        this.carrierType = carrierType;
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public List<DiyFieldEntity> getDiyField() {
        return diyField;
    }

    public void setDiyField(List<DiyFieldEntity> diyField) {
        this.diyField = diyField;
    }

    public String getCarNo() {
        return carNo;
    }

    public void setCarNo(String carNo) {
        this.carNo = carNo;
    }

    public String getFreightUnit() {

        if (freightUnit == null) {
            return "元/吨";
        }
        switch (freightUnit) {
            case 1:
                return "元/趟";
            case 2:
                return "元/吨";
            case 3:
                return "元/方";
        }
        return "元/吨";
    }

    public String getUnit() {
        return unit;
    }

    public void setCarLenName(String carLenName) {
        this.carLenName = carLenName;
    }

    public String getCarLenName() {
        return carLenName;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarTypeName(String carTypeName) {
        this.carTypeName = carTypeName;
    }

    public String getCarTypeName() {
        return carTypeName;
    }

    public void setCarrierId(String carrierId) {
        this.carrierId = carrierId;
    }

    public String getCarrierId() {
        return carrierId;
    }

    public void setCarrierNo(String carrierNo) {
        this.carrierNo = carrierNo;
    }

    public String getCarrierNo() {
        return carrierNo;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public void setContrcts(String contrcts) {
        this.contrcts = contrcts;
    }

    public String getContrcts() {
        return contrcts;
    }

    public void setContrctsNumber(String contrctsNumber) {
        this.contrctsNumber = contrctsNumber;
    }

    public String getContrctsNumber() {
        return contrctsNumber;
    }

    public void setDestCityName(String destCityName) {
        this.destCityName = destCityName;
    }

    public String getDestCityName() {
        return destCityName;
    }

    public void setDestDetailAddress(String destDetailAddress) {
        this.destDetailAddress = destDetailAddress;
    }

    public String getDestDetailAddress() {
        return destDetailAddress;
    }

    public void setDestDistrictName(String destDistrictName) {
        this.destDistrictName = destDistrictName;
    }

    public String getDestDistrictName() {
        return destDistrictName;
    }

    public void setDestProvinceName(String destProvinceName) {
        this.destProvinceName = destProvinceName;
    }

    public String getDestProvinceName() {
        return destProvinceName;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getFreight() {
        if (TextUtils.isEmpty(freight))
            return "";
        return NumberUtil.trim0(freight);
    }

    public void setHeightHurdle(String heightHurdle) {
        this.heightHurdle = heightHurdle;
    }

    public String getHeightHurdle() {
        return heightHurdle;
    }

    public void setInvoice(String invoice) {
        this.invoice = invoice;
    }

    public String getInvoice() {
        if (TextUtils.isEmpty(invoice)) {
            return "/";
        }
        switch (invoice) {
            case "1":
                return "不开发票";
            case "2":
                return "普通发票";
            case "3":
                return "增值税专用发票";
            default:
                return invoice;
        }
    }

    public void setIsDump(Integer isDump) {
        this.isDump = isDump;
    }

    public Integer getIsDump() {
        return isDump;
    }

    public void setMessageStatus(int messageStatus) {
        this.messageStatus = messageStatus;
    }

    public int getMessageStatus() {
        return messageStatus;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getNote() {
        return note;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getPayType() {
        if (TextUtils.isEmpty(payType)) {
            return "/";
        }
        return payType;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setRate(String rate) {
        this.rate = rate;
    }

    public String getRate() {
        if (rate == null) {
            rate = "";
        }
        return rate;
    }

    public void setShipmentEndTime(Long shipmentEndTime) {
        this.shipmentEndTime = shipmentEndTime;
    }

    public Long getShipmentEndTime() {
        return shipmentEndTime;
    }

    public void setShipmentStartTime(Long shipmentStartTime) {
        this.shipmentStartTime = shipmentStartTime;
    }

    public Long getShipmentStartTime() {
        return shipmentStartTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public Double getWeight() {
        return weight;
    }

    public class userVo {
        private String imToken;
        private String imAccount;
        String headImg;

        public String getHeadImg() {
            return headImg;
        }

        public void setHeadImg(String headImg) {
            this.headImg = headImg;
        }

        public String getImToken() {
            return imToken;
        }

        public void setImToken(String imToken) {
            this.imToken = imToken;
        }

        public String getImAccount() {
            return imAccount;
        }

        public void setImAccount(String imAccount) {
            this.imAccount = imAccount;
        }

        @Override
        public String toString() {
            return "userVo{" +
                    "imToken='" + imToken + '\'' +
                    ", imAccount='" + imAccount + '\'' +
                    ", headImg='" + headImg + '\'' +
                    '}';
        }
    }

    public OwnerCarriageDetail.userVo getUserVo() {
        return userVo;
    }

    public void setUserVo(OwnerCarriageDetail.userVo userVo) {
        this.userVo = userVo;
    }

    public Integer getBargain() {
        return bargain;
    }

    public void setBargain(Integer bargain) {
        this.bargain = bargain;
    }
}
